import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/AddRight',
      name: 'AddRight',
      component: () => import('../views/Right/AddRightView.vue'),
    },
    {
      path: '/ShowRight',
      name: 'ShowRight',
      component: () => import('../views/Right/ShowRightView.vue'),
    },
    {
      path: '/UpdRight',
      name: 'UpdRight',
      component: () => import('../views/Right/UpdRightView.vue'),
    },
    {
      path: '/AddUser',
      name: 'AddUser',
      component: () => import('../views/User/AddUserView.vue'),
    },
    {
      path: '/LoginUser',
      name: 'LoginUser',
      component: () => import('../views/User/LoginView.vue'),
    },
    {
      path: '/AddMember',
      name: 'AddMember',
      component: () => import('../views/Member/AddMemberView.vue'),
    },
    {
      path: '/ShowMember',
      name: 'ShowMember',
      component: () => import('../views/Member/ShowMemberView.vue'),
    },
    {
      path: '/UpdMember',
      name: 'UpdMember',
      component: () => import('../views/Member/UpdMemberView.vue'),
    },
    {
      path: '/AddLevel',
      name: 'AddLevel',
      component: () => import('../views/MemberLevel/AddLevelView.vue'),
    },
    {
      path: '/ShowLevel',
      name: 'ShowLevel',
      component: () => import('../views/MemberLevel/ShowLevelView.vue'),
    },
  ],
})

export default router
